package com.macro.controller;

import com.macro.pojos.dto.ResponseResult;
import com.macro.service.UiCategoryService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestHeader;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/api/v1/category")
@Api(tags = "分类管理")
public class UiCategoryController {

    @Autowired
    UiCategoryService uiCategoryService;

    /**
     * 分类查询
     * @param userId
     * @return
     */
    @GetMapping("/queryCategory")
    @ApiOperation(value = "分类查询",notes = "分类查询")
    public ResponseResult queryCategory(@RequestHeader Integer userId){
        return uiCategoryService.queryCategory();
    }

}
